<!DOCTYPE html>
<html lang="en">
<head>
    <#include "/common/header.ftl">
</head>
<body>
<div id="wrapper" class="toggled">
    <#include "/common/nav.ftl">
    <div class="page-content-wrapper">
        <div class="container-fluid">
            <#include "/common/search.ftl">
            <div class="row clearfix">


                            <div class="col-md-12 column">
                                <table class="table table table-hover table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th>订单ID</th>
                                        <th>总金额</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td>${orderDTO.orderId}</td>
                                        <td>${orderDTO.orderAmount}</td>
                                    </tr>
                                    </tbody>
                                </table>
                            </div>

                            <div class="col-md-12 column">
                                <table class="table table table-hover table-bordered table-condensed">
                                    <thead>
                                    <tr>
                                        <th>商品ID</th>
                                        <th>商品名称</th>
                                        <th>商品价格</th>
                                        <th>商品数量</th>
                                        <th>商品总价</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <#list orderDTO.orderDetailList as orderDetail>
                                        <tr>
                                            <td>${orderDetail.productId}</td>
                                            <td>${orderDetail.productName}</td>
                                            <td>${orderDetail.productPrice}</td>
                                            <td>${orderDetail.productQuantity}</td>
                                            <td>${orderDetail.productPrice * orderDetail.productQuantity}</td>
                                        </tr>
                                    </#list>
                                    </tbody>
                                </table>
                            </div>


                <div class="col-md-12 column">
                    <#if orderDTO.getOrderStatusEnum().message == "新订单">
                        <a  class="btn btn-default btn-primary" type="button" href="/orderMaster/cancel?orderId=${orderDTO.orderId}&page=${page}&size="${size}">取消订单</a>
                    </#if>
                    <#if orderDTO.getOrderStatusEnum().message == "新订单">
                        <a class="btn btn-default btn-primary" type="button" href="/orderMaster/finish?orderId=${orderDTO.orderId}&page=${page}&size="${size}">完结订单</a>
                    </#if>
                </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
</body>

<script>
</script>

</html>